import request from '@/utils/request';

export type LoginParamsType = {
  username: string;
  password: string;
};

export async function login(params: any) {
  console.log(params);
  return request('/api/admin/login', {
    method: 'POST',
    data: params,
  });
}

export async function rg(params: any) {
  return request('/api/merchant/register', {
    method: 'POST',
    data: params,
  });
}
export async function uploadList(params: any) {
  return request('/api/file/get', {
    method: 'POST',
    data: params,
  });
}

export async function saveUploaInfo(params: any) {
  return request('/api/file/save', {
    method: 'POST',
    data: params,
  });
}
export async function sendCaptchaCode(params: any) {
  return request('/api/merchant/smsVerifyCode', {
    method: 'POST',
    data: params,
  });
}

export async function getFakeCaptcha(mobile: string) {
  return request(`/api/login/captcha?mobile=${mobile}`);
}
